Skip to content

[improve][pip] PIP-405: Enhanced Dynamic Handling of Selective Consumers in MultiTopicConsumers #23895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Denovo1998
Copy link
Contributor

Motivation

In Pulsar, consumers can subscribe to multiple topics by pattern or by passing a list of topics.

However, currently, if you need to modify this pattern, it often requires shutting down the existing consumers and creating new consumers with the new pattern.

This is because in MultiTopicConsumer, each operation is applied to all consumers.

We hope to dynamically add or remove certain topics without affecting other subscribed topics.

We want a way to unsubscribe or close from certain consumers and add new ones without restarting the entire consumer.

Additionally, these changes should remain optional for users who do not need them.

This helps developers experiment with dynamic subscription capabilities without cluttering the core consumer interface.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:


# Motivation

We want a way to unsubscribe or close from certain consumers and add new ones without restarting the entire consumer.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here might not only be "close" or "unsubscribe," "subscribe." It seems that "pause" and "resume" can also be added? Everyone take a look at this section?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs PIP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant